#ifndef DEXCLIP_H
#define DEXCLIP_H

#include <QClipboard>
#include <QDialog>
#include <QSystemTrayIcon>

class QAbstractButton;
class QAction;
class QActionGroup;
class QMenu;
class QSettings;
class QTimer;

namespace Ui {
	class DexClip;
}

class DexClip : public QDialog
	{
		Q_OBJECT
		public:
			DexClip(QWidget * parent = 0);
			~DexClip();

			static QString homePath;

		protected:
			void changeEvent(QEvent *);
			void init();
			void restoreHistory();
			void restoreSettings();
			void saveSettings();

		private:
			Ui::DexClip * ui;
			QActionGroup * history;
			QMenu * menu;
			QSystemTrayIcon * iconTray;
			QClipboard * clipboard;
			QAction * separator;
			QSettings * settings;
			QTimer * timer;
			bool startingUp;

		public slots:
			void about();

		protected slots:
			void saveHistory();

		private slots:
			void clearClipboard();
			void clicked(QAbstractButton*);
			void setClipboardText(QAction *);
			void systrayActivated(QSystemTrayIcon::ActivationReason);
			void updateClipboardMenu(QClipboard::Mode);
			void updateMenuWithClipboard();
			void updateMenuWithSelection();
	};

#endif // DEXCLIP_H
